import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Random;
import java.util.concurrent.TimeUnit;

public class TimeUnitTest {

    public static void main(String[] args) throws InterruptedException {
        TimeUnit.SECONDS.sleep(1);
        TimeUnit.MILLISECONDS.sleep(1000);
        System.out.println(TimeUnit.DAYS.toSeconds(1));
        //convert 1 day to 24 hour
        System.out.println(TimeUnit.DAYS.toHours(1));
        //convert 1 hour to 60*60 second.
        System.out.println(TimeUnit.HOURS.toSeconds(1));
        //convert 3 days to 72 hours.
        System.out.println(TimeUnit.HOURS.convert(3, TimeUnit.DAYS));

        LocalDate localDate = LocalDate.now();
        System.out.println(localDate);
        System.out.println(DateTimeFormatter.BASIC_ISO_DATE.toString());

        for (int i = 0; i < 100; i++) {
            System.out.println(new Random().nextInt(10000));
        }
    }
}
